LINT_LOG: "eslint-report.xml"
LINT_MR_LOG: "eslint-mr-report.xml"
-image: registry.gitlab.gnome.org/gnome/mutter/fedora/34:x86_64-2021-08-01.0
+image: registry.gitlab.gnome.org/gnome/mutter/fedora/34:x86_64-2021-08-25.0
workflow:
rules:
try {
let [ok_, bytes] = f.load_contents(null);
- return imports.byteArray.toString(bytes);
+ return new TextDecoder().decode(bytes);
} catch (e) {
log(`Failed to load D-Bus interface ${iface}`);
}
/* exported Component */
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
-const ByteArray = imports.byteArray;
const Signals = imports.signals;
const Dialog = imports.ui.dialog;
return;
}
- this._vpnChildProcessLineOldStyle(ByteArray.toString(line));
+ const decoder = new TextDecoder();
+ this._vpnChildProcessLineOldStyle(decoder.decode(line));
// try to read more!
this._readStdoutOldStyle();
let contentOverride;
try {
- data = ByteArray.toGBytes(this._dataStdout.peek_buffer());
+ data = new GLib.Bytes(this._dataStdout.peek_buffer());
keyfile.load_from_bytes(data, GLib.KeyFileFlags.NONE);
if (keyfile.get_integer(VPN_UI_GROUP, 'Version') != 2)
* @returns {void}
*/
function _injectSoup3Compat(Soup) {
- const ByteArray = imports.byteArray;
-
Soup.StatusCode = Soup.KnownStatusCode;
Soup.Message.new_from_encoded_form =
this.set_request(
contentType,
Soup.MemoryUse.COPY,
- ByteArray.toString(bytes.get_data()));
+ new TextDecoder().decode(bytes.get_data()));
};
Soup.Session.prototype.send_and_read_async =
const { Clutter, Gio, GLib, GObject, Soup } = imports.gi;
-const ByteArray = imports.byteArray;
-
const Config = imports.misc.config;
const Dialog = imports.ui.dialog;
const ExtensionUtils = imports.misc.extensionUtils;
GLib.PRIORITY_DEFAULT,
null);
checkResponse(message);
- info = JSON.parse(ByteArray.toString(bytes.get_data()));
+ const decoder = new TextDecoder();
+ info = JSON.parse(decoder.decode(bytes.get_data()));
} catch (e) {
Main.extensionManager.logExtensionError(uuid, e);
invocation.return_dbus_error(
shell_version: Config.PACKAGE_VERSION,
disable_version_validation: versionCheck.toString(),
};
- const requestBody = new GLib.Bytes(
- ByteArray.fromString(JSON.stringify(metadatas)));
+ const requestBody = new GLib.Bytes(JSON.stringify(metadatas));
const message = Soup.Message.new('POST',
'%s?%s'.format(REPOSITORY_URL_UPDATE, Soup.form_encode_hash(params)));
GLib.PRIORITY_DEFAULT,
null);
checkResponse(message);
- json = ByteArray.toString(bytes.get_data());
+ json = new TextDecoder().decode(bytes.get_data());
} catch (e) {
log('Update check failed: %s'.format(e.message));
return;
/* exported init connect disconnect */
const { GLib, Gio, GObject, Shell, St } = imports.gi;
-const ByteArray = imports.byteArray;
const Signals = imports.signals;
const ExtensionDownloader = imports.ui.extensionDownloader;
let metadataContents, success_;
try {
[success_, metadataContents] = metadataFile.load_contents(null);
- metadataContents = ByteArray.toString(metadataContents);
+ metadataContents = new TextDecoder().decode(metadataContents);
} catch (e) {
throw new Error('Failed to load metadata.json: %s'.format(e.toString()));
}
/* exported KeyboardManager */
const { Clutter, Gio, GLib, GObject, Graphene, Meta, Shell, St } = imports.gi;
-const ByteArray = imports.byteArray;
const Signals = imports.signals;
const EdgeDragAction = imports.ui.edgeDragAction;
_loadModel(groupName) {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/osk-layouts/%s.json'.format(groupName));
let [success_, contents] = file.load_contents(null);
- contents = ByteArray.toString(contents);
- return JSON.parse(contents);
+ const decoder = new TextDecoder();
+ return JSON.parse(decoder.decode(contents));
}
getLevels() {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/osk-layouts/emoji.json');
let [success_, contents] = file.load_contents(null);
- if (contents instanceof Uint8Array)
- contents = imports.byteArray.toString(contents);
- let emoji = JSON.parse(contents);
+ let emoji = JSON.parse(new TextDecoder().decode(contents));
let variants = [];
let currentKey = 0;
const { Atk, Clutter, GDesktopEnums, Gio,
GLib, GObject, Gtk, Meta, Pango, Rsvg, St } = imports.gi;
-const ByteArray = imports.byteArray;
const Signals = imports.signals;
const Main = imports.ui.main;
_init(params) {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css');
let [success_, css] = file.load_contents(null);
- css = ByteArray.toString(css);
this._curEdited = null;
this._prevEdited = null;
- this._css = css;
+ this._css = new TextDecoder().decode(css);
this._labels = [];
this._activeButtons = [];
super._init(params);
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported SessionMode, listModes */
-const ByteArray = imports.byteArray;
const GLib = imports.gi.GLib;
const Signals = imports.signals;
let fileContent, success_, newMode;
try {
[success_, fileContent] = file.load_contents(null);
- fileContent = ByteArray.toString(fileContent);
- newMode = JSON.parse(fileContent);
+ const decoder = new TextDecoder();
+ newMode = JSON.parse(decoder.decode(fileContent));
} catch (e) {
return;
}
gcr_req = '>= 3.7.5'
gio_req = '>= 2.56.0'
gi_req = '>= 1.49.1'
-gjs_req = '>= 1.68.1'
+gjs_req = '>= 1.69.2'
gtk_req = '>= 3.15.0'
mutter_req = '>= 41.beta'
polkit_req = '>= 0.100'
try {
let [ok_, bytes] = f.load_contents(null);
- return imports.byteArray.toString(bytes);
+ return new TextDecoder().decode(bytes);
} catch (e) {
log('Failed to load D-Bus interface %s'.format(iface));
}